﻿using System;
using System.Net;
using System.Threading;
using System.Collections.Generic;

namespace UDPSocketProject
{
    class MainClass
    {
        public static void Main(string[] args)
        {
            UDPSocketServices socketServices = new UDPSocketServices(new IPAddress(new byte[] { 192, 168, 16, 57 }), 2112);
            Thread server = new Thread(new ThreadStart(socketServices.StartListen));
            server.Start();

            //Tests
            //写入oui.txt的mac数据到数据库MacOui表中
            //MacOuiManager.InsertOui();

            //测试存储过程调用

            //DataFrameHeaderModel headerModel = new DataFrameHeaderModel();
            //headerModel.devid = "Test003";
            //headerModel.devmac = "3C-D9-2B-00-22-77";
            //headerModel.latitude = 123.12345;
            //headerModel.longitude = 123.12345;
            //headerModel.dataFrameList = new List<DataFrameModel>();

            //DataFrameModel dataModel01 = new DataFrameModel();
            //dataModel01.stamac = "3C-D9-2B-00-22-04";
            //dataModel01.apmac = "3C-D9-2B-00-22-77";
            //dataModel01.ssid = "Phone04";
            //dataModel01.rssi = -1;
            //dataModel01.channel = 1;
            //headerModel.dataFrameList.Add(dataModel01);

            //DataFrameModel dataModel02 = new DataFrameModel();
            //dataModel02.stamac = "3C-D9-2B-00-22-05";
            //dataModel02.apmac = "3C-D9-2B-00-22-77";
            //dataModel02.ssid = "Phone05";
            //dataModel02.rssi = -2;
            //dataModel02.channel = 2;
            //headerModel.dataFrameList.Add(dataModel02);

            //DataFrameModel dataModel03 = new DataFrameModel();
            //dataModel03.stamac = "3C-D9-2B-00-22-06";
            //dataModel03.apmac = "3C-D9-2B-00-22-77";
            //dataModel03.ssid = "Phone06";
            //dataModel03.rssi = -3;
            //dataModel03.channel = 3;
            //headerModel.dataFrameList.Add(dataModel03);

            //RouterDataManager.InsertDataFrameHeader(headerModel);
		}
    }
}
